import Vue from 'vue';
import index from './invite.vue';
import common from "../../assets/js/common.js";
import VueResource from 'vue-resource';
Vue.use(VueResource);

/*new Vue({
    el: '#app',
    render: h => h(index)
});*/


var backUrl = common.isdev()+"/user/checkLogin.htm";
var hrefUrl = window.location.href;
if(hrefUrl.indexOf("?userInfo=") > -1){
    backUrl = backUrl + hrefUrl.substring(hrefUrl.indexOf("?userInfo="));
}

var promise = Vue.http.post(backUrl).then(function(d) {
    console.info('success');
}, function(err) {
    console.info('err');
});

promise.then(function (response) {
    // 成功回调
    new Vue({
        el: '#app',
        render: h => h(index)
    });
}, function (response) {
    //回调失败
    new Vue({
        el: '#app',
        render: h => h(index)
    });
});
